package com.ytktt.study.week5.task2.naming;

import com.ytktt.study.week5.task2.naming.component.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Java配置的方式
 *
 * @author ytk
 */
public class NamingSpaceApplication {

    public static void main(String[] args) {
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("application-content.xml");
        Student student = (Student) applicationContext.getBean("student");
        System.out.println(student);
    }
}
